package com.xrf;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class EmployeeInfo {
    private String employeeName;
    private Long employeeId;
    private Long department;
    private Double position;
    private Double surnameAndPersonalName;
    private Long sex;
    private String contactWay;
    private String employeeId2; // Renamed to avoid duplicate
    private Long position2; // Renamed to avoid duplicate
    private Double department2; // Renamed to avoid duplicate

    private static List<EmployeeInfo> list = new ArrayList<>();
    private static Scanner scanner = new Scanner(System.in);

    public EmployeeInfo() {}

    public EmployeeInfo(String employeeName, Long employeeId, Long department, Double position,
                       Double surnameAndPersonalName, Long sex, String contactWay, String employeeId2,
                       Long position2, Double department2) {
        this.employeeName = employeeName;
        this.employeeId = employeeId;
        this.department = department;
        this.position = position;
        this.surnameAndPersonalName = surnameAndPersonalName;
        this.sex = sex;
        this.contactWay = contactWay;
        this.employeeId2 = employeeId2;
        this.position2 = position2;
        this.department2 = department2;
    }

    // Getter and Setter methods
    public String getEmployeeName() { return employeeName; }
    public void setEmployeeName(String employeeName) { this.employeeName = employeeName; }
    public Long getEmployeeId() { return employeeId; }
    public void setEmployeeId(Long employeeId) { this.employeeId = employeeId; }
    public Long getDepartment() { return department; }
    public void setDepartment(Long department) { this.department = department; }
    public Double getPosition() { return position; }
    public void setPosition(Double position) { this.position = position; }
    public Double getSurnameAndPersonalName() { return surnameAndPersonalName; }
    public void setSurnameAndPersonalName(Double surnameAndPersonalName) { this.surnameAndPersonalName = surnameAndPersonalName; }
    public Long getSex() { return sex; }
    public void setSex(Long sex) { this.sex = sex; }
    public String getContactWay() { return contactWay; }
    public void setContactWay(String contactWay) { this.contactWay = contactWay; }
    public String getEmployeeId2() { return employeeId2; }
    public void setEmployeeId2(String employeeId2) { this.employeeId2 = employeeId2; }
    public Long getPosition2() { return position2; }
    public void setPosition2(Long position2) { this.position2 = position2; }
    public Double getDepartment2() { return department2; }
    public void setDepartment2(Double department2) { this.department2 = department2; }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("员工姓名:").append(employeeName).append("\t");
        builder.append("员工编号:").append(employeeId).append("\t");
        builder.append("部门:").append(department).append("\t");
        builder.append("职位:").append(position).append("\t");
        builder.append("姓名:").append(surnameAndPersonalName).append("\t");
        builder.append("性别:").append(sex).append("\t");
        builder.append("联系方式:").append(contactWay).append("\t");
        builder.append("员工编号:").append(employeeId2).append("\t");
        builder.append("职位:").append(position2).append("\t");
        builder.append("部门:").append(department2).append("\t");
        return builder.toString();
    }
}